/// ---------------------------------------------
///
/// 江懷玉
/// 
/// ---------------------------------------------

function fnIntiListToolbar(t) {
    var t = $.data($("#tt")[0]);
    var grid = $.data($("#tt")[0], "datagrid").grid;
    var tb = $(".datagrid-toolbar");
    fnAddChild(t, grid, tb, '设置功能权限', SetRoleMenuRight);
    fnAddChild(t, grid, tb, '设置角色用户', SetRoleUser);
}

function fnAddChild(t,grid,tb,_text,fn) {
    $("<div class=\"datagrid-btn-separator\"></div>").appendTo(tb);
    // } else {
    var btn = {
        text:_text,
        iconCls: 'icon-remove',
        handler: fn
    };
    var tool = $("<a href=\"javascript:void(0)\"></a>");
    tool[0].onclick = eval(btn.handler || function () {
    });
    tool.css("float", "left").text(btn.text).attr("icon", btn.iconCls || "").appendTo(tb).linkbutton({ plain: true, disabled: (btn.disabled || false) });
}

function SetRoleMenuRight() {
    
}

function SetRoleUser() {
}